﻿<Window x:Class="MSUS.Kinect.GestureEditor.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
		xmlns:vm="clr-namespace:MSUS.Kinect.GestureEditor.ViewModels"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
		d:DataContext="{d:DesignInstance IsDesignTimeCreatable=True, Type=vm:DesignTimeViewModel}"
		mc:Ignorable="d"
        Title="MainWindow">
	<Window.Resources>
	</Window.Resources>
	<Window.DataContext>
		<vm:MainViewModel />
	</Window.DataContext>
		<Grid>
		<Grid.RowDefinitions>
			<RowDefinition Height="20"/>
			<RowDefinition />
		</Grid.RowDefinitions>
		<Grid.ColumnDefinitions>
			<ColumnDefinition/>
			<ColumnDefinition Width="60"/>
			<ColumnDefinition Width="60"/>
			<ColumnDefinition Width="60"/>
		</Grid.ColumnDefinitions>
		
		<TextBox Name="GesturePath" TextChanged="GesturePath_TextChanged" />
		<Button Name="FindGestureFile" Grid.Column="1" Content="..." Click="FindGestureFile_Click" />
		<Button Name="OpenGesture" Grid.Column="2" Content="Load" Click="OpenGesture_Click" />
		<Button Name="SaveGesture" Grid.Column="3" Content="Save" Click="SaveGesture_Click" />

		<!--<Canvas Name="MainCanvas" Grid.Row="1" Width="640" Height="480"></Canvas>-->
		<ListBox Name="PointsList" ItemsSource="{Binding ScaledPositionNodes}"  Grid.Row="1" Background="Black" >
				<ListBox.ItemsPanel>
					<ItemsPanelTemplate>
						<Canvas Width="640" Height="480"></Canvas>
					</ItemsPanelTemplate>
				</ListBox.ItemsPanel>
				<ListBox.ItemTemplate>
					<DataTemplate>
						<Ellipse Stroke="Blue" StrokeThickness="4" Width="8" Height="8" Canvas.Left="{Binding X}" Canvas.Top="{Binding Y}">
						</Ellipse>
					</DataTemplate>
				</ListBox.ItemTemplate>
			</ListBox>




		<ListBox Name="ItemsList" Grid.Column="1" Grid.Row="1" Grid.ColumnSpan="3" ItemsSource="{Binding ScaledPositionNodes}">
			<ListBox.ItemTemplate>
				<DataTemplate>
					<Grid>
						<Grid.ColumnDefinitions>
							<ColumnDefinition/>
							<ColumnDefinition/>
							<ColumnDefinition/>
						</Grid.ColumnDefinitions>
						<TextBlock Text="{Binding X}" Grid.Column="0"/>
						<TextBlock Text="x" Grid.Column="1"/>
						<TextBlock Text="{Binding Y}" Grid.Column="2"/>
					</Grid>
				</DataTemplate>
			</ListBox.ItemTemplate>
		</ListBox>
	</Grid>
</Window>
